﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DongFangGuoKai.WMSPlatform.Core.Migrations
{
    public partial class M12 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            //migrationBuilder.DropTable(
            //    name: "Boxes");

            migrationBuilder.CreateTable(
                name: "t_StackingStorageDetail",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StackingId = table.Column<int>(type: "int", nullable: false, comment: "组垛主Id"),
                    OrderId = table.Column<int>(type: "int", nullable: false, comment: "委托单Id"),
                    OrderNo = table.Column<string>(type: "varchar(50)", unicode: false, maxLength: 50, nullable: true, comment: "委托单号"),
                    SampleId = table.Column<int>(type: "int", nullable: false, comment: "试样Id"),
                    SampleCode = table.Column<string>(type: "varchar(50)", unicode: false, maxLength: 50, nullable: true, comment: "物料Code"),
                    SampleName = table.Column<string>(type: "varchar(50)", unicode: false, maxLength: 50, nullable: true, comment: "物料名称")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_StackingStorageDetail", x => x.Id);
                },
                comment: "组垛详情表");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "t_StackingStorageDetail");

            //migrationBuilder.CreateTable(
            //    name: "Boxes",
            //    columns: table => new
            //    {
            //        Id = table.Column<int>(type: "int", nullable: false)
            //            .Annotation("SqlServer:Identity", "1, 1"),
            //        BoxId = table.Column<int>(type: "int", nullable: false),
            //        BoxLable = table.Column<int>(type: "int", nullable: false),
            //        BusinessId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
            //        CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
            //        CreateUserId = table.Column<int>(type: "int", nullable: true),
            //        CreateUserName = table.Column<string>(type: "nvarchar(max)", nullable: false),
            //        LocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
            //        OrderId = table.Column<int>(type: "int", nullable: false),
            //        OrderNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
            //        SampleTotalCount = table.Column<int>(type: "int", nullable: true),
            //        Status = table.Column<int>(type: "int", nullable: false)
            //    },
            //    constraints: table =>
            //    {
            //        table.PrimaryKey("PK_Boxes", x => x.Id);
            //    });
        }
    }
}
